package com.matt.components;

import lombok.extern.slf4j.Slf4j;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;

/**
 * *******************************
 * Created by Ron.
 * form com.matt
 * on 2017/5/15
 * *******************************
 */
@Slf4j
public class EncodeFilter implements Filter {

    @Override
    public void init(FilterConfig filterConfig) throws ServletException {
        log.info("init EncodeFilter");
    }

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        log.info("do filter");
        chain.doFilter(request, response);
    }

    @Override
    public void destroy() {
        log.info("destroy EncodeFilter");
    }
}
